<include file="Public:header" /> <include file="Public:navgation" />
<div class="container-fluid main-content">
    <div class="page-title chart-container"> </div>
    <div class="row">
        <div class="widget-container">
            <div class="heading">
                <i class="icon-bar-chart"></i>个人资料
                <a class="text-primary pull-right f-fill" data-toggle="modal" href="#myModal3">修改</a>
            </div>
        </div>
        <div class="col-md-2 col-sm-3">
            <div class="widget-container">
                
                <div class="widget-content padded modal-open white" style="margin-top:10px">
                    <div class="row">
                        <div class="col-sm-4"></div>
                        <div class="profile-info clearfix col-sm-2 text-center messages"  style="width:100%;">
                          <img width="100" height="100" class="social-avatar open-modal" src="{$nlist['img_url']}">
                          <div class="profile-details">
                          <p></p>
                            <a class="user-name" >{$nlist['name']}</a>
                          </div>
                        </div>
                        
                        <ul class="col-sm-2 no-style" style="width:100%;">
                            <li><span class="text-muted">公司名称：&nbsp;</span>{$nlist['sitename']}</li>
                            <li><span class="text-muted">职　　位：&nbsp;</span>{$nlist['groupname']}</li>
                            <li><span class="text-muted">电话号码：&nbsp;</span><span data-name="tel">{$nlist['tel']}</span></li>
                            <li><span class="text-muted">   E-mail  ：&nbsp;</span><span data-name="Email">{$nlist['Email']}</span></li>
                            <li><span class="text-muted">固定规则：&nbsp;</span>
                            <?php
                                $ruleid=explode(',',$nlist['rule_id']);
                                $str='';
                                foreach($ruleid as $val){
                                    foreach($rule as $va){
                                        if($val==$va['id']){
                                            $str.=$va['name'].',';
                                        }
                                    }
                                }
                                echo(trim($str,','));
                            ?>
                            </li>
                            <li><span class="text-muted">部门名称：&nbsp;</span>{$nlist['departname']}</li>
                            <li><span class="text-muted">入职日期：&nbsp;</span>{:date('Y-m-d',$nlist['reg_time'])}</li>
                            <li><span class="text-muted">　　 QQ：&nbsp;</span><span data-name="QQ">{$nlist['QQ']}</span></li>
                            <li><span class="text-muted">联系地址：&nbsp;</span><span data-name="address">{$nlist['address']}</span></li>
                        </ul>
                        <!--<ul class="col-sm-6 no-style text-center">
                            <li><span class="text-muted">部门名称：&nbsp;</span>{$list['departname']}</li>
                            <li><span class="text-muted">入职日期：&nbsp;</span>{:date('Y-m-d',$list['reg_time'])}</li>
                            <li><span class="text-muted">QQ：&nbsp;</span><span data-name="QQ">{$list['QQ']}</span></li>
                            <li><span class="text-muted">联系地址：&nbsp;</span><span data-name="address">{$list['address']}</span></li>
                        </ul>-->
                        
                        <!--<div class="col-sm-6">
                            <span class="text-muted">公司名称：&nbsp;</span>{$list['sitename']}
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">部门名称：&nbsp;</span>{$list['departname']}
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">职位：&nbsp;</span>{$list['groupname']}
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">入职日期：&nbsp;</span>{:date('Y-m-d',$list['reg_time'])}
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">电话号码：&nbsp;</span><span data-name="tel">{$list['tel']}</span>
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">QQ：&nbsp;</span><span data-name="QQ">{$list['QQ']}</span>
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">E-mail：&nbsp;</span><span data-name="Email">{$list['Email']}</span>
                        </div>
                        <div class="col-sm-6">
                            <span class="text-muted">联系地址：&nbsp;</span><span data-name="address">{$list['address']}</span>
                        </div> 
                        <div class="col-sm-6">
                            <span class="text-muted">固定规则：&nbsp;</span>
                            <?php
                                $ruleid=explode(',',$list['rule_id']);
                                $str='';
                                foreach($ruleid as $val){
                                    foreach($rule as $va){
                                        if($val==$va['id']){
                                            $str.=$va['name'].',';
                                        }
                                    }
                                }
                                echo(trim($str,','));
                            ?>
                        </div>     -->
                    </div>
                    <!--modal start-->
                    <div class="modal fade" id="myModal3" style="display: none;" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <form method="post" name="formupdate" class="form-horizontal" novalidate action="__URL__/update">
                                    <div class="modal-header">
                                        <button aria-hidden="true" class="close" data-dismiss="modal" type="button">×</button>
                                        <h4 class="modal-title">修改个人资料</h4>
                                    </div>
                                    <div class="modal-body">
                                        <fieldset>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">密码：</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="password" type="password">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">电话号码：</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="tel" type="tel">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">QQ：</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="QQ" type="number">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">E-mail：</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="Email" type="email">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">联系地址：</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="address" type="text">
                                                </div>
                                            </div>
                                        </fieldset>
                                    </div>
                                    <div class="modal-footer">
                                        <button class="btn btn-primary" type="submit">修改</button>
                                        <button class="btn btn-default-outline" data-dismiss="modal" type="button">关闭</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <!--modal start-->
                </div>
            </div>
        </div>
        <div class="col-md-10 col-sm-9">
            <div class="row">
                <!-- Area Charts:Morris --><!-- Chat -->
                <div class="col-md-6 col-lg-5">
                    <div class="widget-container scrollable chat" style="height: 427px;margin-top:10px">
                        <div class="heading">
                            <i class="glyphicon glyphicon-cog"></i>积分管理
                        </div>
                        <script src="__PUBLIC__/Js/highcharts.src.js"></script>
                        <div class="widget-content padded">
                            <div class="chart-graph line-chart">
                                <div id="containero" style="min-width: 310px; height: 300px; margin: 0 auto"></div>

                                <script type="text/javascript">
                                    $(function () {
                                        $('#containero').highcharts({
                                            title: {
                                                text: ''
                                            },
                                            subtitle: {
                                                text: ''
                                            },
                                            xAxis: {
                                                type: 'datetime',
                                                labels: {
                                                    overflow: 'justify'
                                                }
                                            },
                                            yAxis: {
                                                title: {
                                                    text: '个人月积分'
                                                },
                                                minorGridLineWidth: 0,
                                                gridLineWidth: 0,
                                                alternateGridColor: null,
                                                plotBands: []
                                            },
                                            tooltip: {
                                                valueSuffix: ' 个'
                                            },
                                            plotOptions: {
                                                spline: {
                                                    lineWidth: 1,
                                                    states: {
                                                        hover: {
                                                            lineWidth: 1
                                                        }
                                                    },
                                                    marker: {
                                                        enabled: false
                                                    },
                                                    pointInterval: 3600*24*1000, // 24 hour
                                                    pointStart: Date.UTC({:date('Y',$stime)}, <if condition="date('m', $stime) eq 1">12<else/><?php echo date('m', $stime)-1;?></if>, 1, 0, 0, 0)
                                    }
                                    },
                                        series: [
                                        {
                                            name: '积分变化',
                                            data: [
                                            <volist name="memberlist" id="dvo">
                                                    {$dvo.changenum},
                                            </volist>

                                        ]
                                    },

                                        ],
                                        navigation: {
                                            menuItemStyle: {
                                                fontSize: '2px'
                                            }
                                        }
                                    });
                                    });
                                </script>
                                <!-- end Line Chart -->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Area Charts:Morris --><!-- Chat -->
                <div class="col-md-6 col-lg-5">
                    <div class="widget-container scrollable  list task-widget padded" style="height: 427px;margin-top:10px">
                        <div class="heading">
                            <a href="{:U('Task_daily/index')}"><i class="glyphicon glyphicon-cog"></i>任务管理</a>
                        </div>
                        <div class="widget-content padded">
                            <ul>
                                <?php  $alltask=count($tasklist);$done=0;$undone=0; ?>
                                <?php foreach($tasklist as $v){ ?>
                                <li onClick="_openWindow('{:U('Task_daily/view',['id'=>$v['id']])}',500, '查看任务', '取消',null,'')" >
                                    <label>
              <span>
              <?= $v['title'] ?>
              </span>
                                        <div class="label label-<?= $v['status']==1?'success':'warning' ?> pull-right">
                                            <?php if($v['status']==1){
                    	$done+=1;
                        echo('已完成');
                    }else{
                    	$undone+=1;
                        echo('未完成');
                    } ?>
                                        </div>
                                        <div class="pull-right text-muted">参与人：
                                            <?= empty($v['member_name'])?'无':$v['member_name'] ?>
                                            &nbsp;&nbsp;</div>
                                    </label>
                                </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
                <!-- Area Charts:Morris --><!-- Chat -->
                <div class="col-md-6 col-lg-5">
                    <div class="widget-container scrollable list task-widget padded" style="height: 427px;margin-top:10px">
                        <div class="heading">
                            <i class="glyphicon glyphicon-cog"></i>审核管理
                        </div>
                        <div class="widget-content">
                            <ul>
                                <?php $mdone=0;$mundone=0;$mrefuse=0;$mdoning=0;foreach($list as $v){ ?>
                                <li onClick="_openWindow('{:U('Mission/read', array('id' => $v['id']))}', 500, '{$v.title}(审批)', '确认', null, '')">
                                    <label>
                                        <?= $v['title'] ?>
                                        <eq name="v['state']" value="0"> <span class="label pull-right label-danger">驳回</span> </eq>
                                        <eq name="v['state']" value="1"> <span class="label pull-right label-warning">未审批</span> </eq>
                                        <eq name="v['state']" value="2"> <span class="label pull-right label-info">审批中</span> </eq>
                                        <eq name="v['state']" value="3"> <span class="label pull-right label-success">通过</span> </eq>
                <span class="text-muted pull-right">申请人：
                {: empty($v['proposername'])?'无':$v['proposername'] }
                    <?php switch($v['state']){
                    	case 0:
                        	$mrefuse+=1;
                        break;
                    	case 1:
                        	$mundone+=1;
                        break;
                    	case 2:
                        	$mdoning+=1;
                        break;
                    	case 3:
                        	$mdone+=1;
                        break;
                    } ?>
                    &nbsp;&nbsp;</span> </label>
                                </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
                <!-- Area Charts:Morris --><!-- Chat -->
                <div class="col-md-6 col-lg-5">
                    <div class="widget-container scrollable chat task-widget item  fluid-height social-entry" style="height: 427px;margin-top:10px">
                        <div class="heading">
                            <a href="{:U('Info_log/index')}"><i class="glyphicon glyphicon-cog"></i>日志管理</a>
                        </div>
                    <div class="widget-content padded">
                        <volist name="loglist" id="loglist">
                            <div>
                                <div class="profile-info clearfix">
                                    <img width="50" height="50" class="social-avatar pull-left" src="{$loglist.img}" />
                                    <div class="profile-details">
                                        <a class="user-name" href="#">
                                            <empty name="loglist.name">
                                            {$loglist['nickname']}
                                                <else />{$loglist['name']}
                                            </empty>
                                        </a>
                                        <p>
                                            <em>{$loglist['datetime']|date="Y-m-d H:i:s",###}</em>
                                        </p>
                                    </div>
                                </div>
                                <a class="table-actions fancybox look" data-remark="{$loglist.content|strip_tags}" data-id="{$loglist['id']}" href="#fancybox"><p class="content" >
                                {$loglist['content']|strip_tags}
                            </p>
                                </a>

                                <div class="btn btn-sm btn-default-outline">
                                    <i class="icon-thumbs-up-alt"></i>
                                </div>
                            </div>
                        </volist>
                    </div>
                </div>
            </div>
        </div>
        <!-- modal end and fancybox start-->
        <div id="fancybox" style="display: none;">
            <h4 class="text-muted">查看</h4>
            <ul class="no-style">
            </ul>
        </div>
        <!-- fancybox end and fancybox start-->
        <div id="fancybox2" style="display: none;">
            <ul class="nav nav-tabs" role="tablist">
                <foreach name="memberlist" item="vo">
                    <li role="presentation"><a href="#{$key}" aria-controls="{$key}" role="tab" data-toggle="tab">{$key}</a></li>
                </foreach>
            </ul>

            <!-- Tab panes -->
            <div class="tab-content" style="min-height:160px">
                <foreach name="memberlist" item="vo">
                    <div role="tabpanel" class="tab-pane" id="{$key}">
                        <foreach name="vo" item="ko">
                            <label class="checkbox-inline">
                                <input name="staff" type="checkbox" value="{$ko.id}">
                                <span>{$ko.name}</span></label>
                        </foreach>
                    </div>
                </foreach>
            </div>
            <div class="col-xs-12">
                <label class="checkbox-inline checkall">
                    <input type="checkbox">
                    <span>全选</span></label>
                <button class="btn btn-primary btn-md pull-right f-getstaff">确定</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> 
<include file="Public:footer" />